package com.shiyi.design.proxy;

/**
 * @author wangzhanshuai
 * @date 2021/2/5 8:16 下午
 * @since 1.0
 */
public class TimeStaticProxy implements Movable{

    private Movable movable;

    public TimeStaticProxy(Movable movable) {
        this.movable = movable;
    }

    @Override
    public void move() {
        long startTime = System.currentTimeMillis();
        movable.move();
        long endTime = System.currentTimeMillis();
        System.out.println("move time: " + (endTime - startTime));
    }
}
